<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="discoveryengine_v1.html">Discovery Engine API</a> . <a href="discoveryengine_v1.projects.html">projects</a> . <a href="discoveryengine_v1.projects.locations.html">locations</a> . <a href="discoveryengine_v1.projects.locations.collections.html">collections</a> . <a href="discoveryengine_v1.projects.locations.collections.dataStores.html">dataStores</a> . <a href="discoveryengine_v1.projects.locations.collections.dataStores.sessions.html">sessions</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="discoveryengine_v1.projects.locations.collections.dataStores.sessions.answers.html">answers()</a></code>
</p>
<p class="firstline">Returns the answers Resource.</p>

<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.</p>
<p class="toc_element">
  <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.</p>
<p class="toc_element">
  <code><a href="#get">get(name, includeAnswerDetails=None, x__xgafv=None)</a></code></p>
<p class="firstline">Gets a Session.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists all Sessions by their parent DataStore.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
  <pre>Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.

Args:
  parent: string, Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required)
  body: object, The request body.
    The object takes the form of:

{ # External session proto definition.
  &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
  &quot;endTime&quot;: &quot;A String&quot;, # Output only. The time the session finished.
  &quot;isPinned&quot;: True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
  &quot;labels&quot;: [ # Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
    &quot;A String&quot;,
  ],
  &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
  &quot;startTime&quot;: &quot;A String&quot;, # Output only. The time the session started.
  &quot;state&quot;: &quot;A String&quot;, # The state of the session.
  &quot;turns&quot;: [ # Turns.
    { # Represents a turn, including a query from the user and a answer from service.
      &quot;answer&quot;: &quot;A String&quot;, # Optional. The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
      &quot;detailedAnswer&quot;: { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
        &quot;answerSkippedReasons&quot;: [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
          &quot;A String&quot;,
        ],
        &quot;answerText&quot;: &quot;A String&quot;, # The textual answer.
        &quot;citations&quot;: [ # Citations.
          { # Citation info for a segment.
            &quot;endIndex&quot;: &quot;A String&quot;, # End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
            &quot;sources&quot;: [ # Citation sources for the attributed segment.
              { # Citation source.
                &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
              },
            ],
            &quot;startIndex&quot;: &quot;A String&quot;, # Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
          },
        ],
        &quot;completeTime&quot;: &quot;A String&quot;, # Output only. Answer completed timestamp.
        &quot;createTime&quot;: &quot;A String&quot;, # Output only. Answer creation timestamp.
        &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
        &quot;groundingSupports&quot;: [ # Optional. Grounding supports.
          { # Grounding support for a claim in `answer_text`.
            &quot;endIndex&quot;: &quot;A String&quot;, # Required. End of the claim, exclusive.
            &quot;groundingCheckRequired&quot;: True or False, # Indicates that this claim required grounding check. When the system decided this claim didn&#x27;t require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
            &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
            &quot;sources&quot;: [ # Optional. Citation sources for the claim.
              { # Citation source.
                &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
              },
            ],
            &quot;startIndex&quot;: &quot;A String&quot;, # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
          },
        ],
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
        &quot;queryUnderstandingInfo&quot;: { # Query understanding information. # Query understanding information.
          &quot;queryClassificationInfo&quot;: [ # Query classification information.
            { # Query classification information.
              &quot;positive&quot;: True or False, # Classification output.
              &quot;type&quot;: &quot;A String&quot;, # Query classification type.
            },
          ],
        },
        &quot;references&quot;: [ # References.
          { # Reference.
            &quot;chunkInfo&quot;: { # Chunk information. # Chunk information.
              &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
              &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
              &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;title&quot;: &quot;A String&quot;, # Title.
                &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
              },
              &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
            },
            &quot;structuredDocumentInfo&quot;: { # Structured search information. # Structured document information.
              &quot;document&quot;: &quot;A String&quot;, # Document resource name.
              &quot;structData&quot;: { # Structured search data.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;title&quot;: &quot;A String&quot;, # Output only. The title of the document.
              &quot;uri&quot;: &quot;A String&quot;, # Output only. The URI of the document.
            },
            &quot;unstructuredDocumentInfo&quot;: { # Unstructured document information. # Unstructured document information.
              &quot;chunkContents&quot;: [ # List of cited chunk contents derived from document content.
                { # Chunk content.
                  &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                  &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                  &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                },
              ],
              &quot;document&quot;: &quot;A String&quot;, # Document resource name.
              &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;title&quot;: &quot;A String&quot;, # Title.
              &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
            },
          },
        ],
        &quot;relatedQuestions&quot;: [ # Suggested related questions.
          &quot;A String&quot;,
        ],
        &quot;safetyRatings&quot;: [ # Optional. Safety ratings.
          { # Safety rating corresponding to the generated content.
            &quot;blocked&quot;: True or False, # Output only. Indicates whether the content was filtered out because of this rating.
            &quot;category&quot;: &quot;A String&quot;, # Output only. Harm category.
            &quot;probability&quot;: &quot;A String&quot;, # Output only. Harm probability levels in the content.
            &quot;probabilityScore&quot;: 3.14, # Output only. Harm probability score.
            &quot;severity&quot;: &quot;A String&quot;, # Output only. Harm severity levels in the content.
            &quot;severityScore&quot;: 3.14, # Output only. Harm severity score.
          },
        ],
        &quot;state&quot;: &quot;A String&quot;, # The state of the answer generation.
        &quot;steps&quot;: [ # Answer generation steps.
          { # Step information.
            &quot;actions&quot;: [ # Actions.
              { # Action.
                &quot;observation&quot;: { # Observation. # Observation.
                  &quot;searchResults&quot;: [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
                    {
                      &quot;chunkInfo&quot;: [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
                        { # Chunk information.
                          &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
                          &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                          &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                        },
                      ],
                      &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                      &quot;snippetInfo&quot;: [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
                        { # Snippet information.
                          &quot;snippet&quot;: &quot;A String&quot;, # Snippet content.
                          &quot;snippetStatus&quot;: &quot;A String&quot;, # Status of the snippet defined by the search team.
                        },
                      ],
                      &quot;structData&quot;: { # Data representation. The structured JSON data for the document. It&#x27;s populated from the struct data from the Document, or the Chunk in search result.
                        &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                      },
                      &quot;title&quot;: &quot;A String&quot;, # Title.
                      &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
                    },
                  ],
                },
                &quot;searchAction&quot;: { # Search action. # Search action.
                  &quot;query&quot;: &quot;A String&quot;, # The query to search.
                },
              },
            ],
            &quot;description&quot;: &quot;A String&quot;, # The description of the step.
            &quot;state&quot;: &quot;A String&quot;, # The state of the step.
            &quot;thought&quot;: &quot;A String&quot;, # The thought of the step.
          },
        ],
      },
      &quot;detailedAssistAnswer&quot;: { # AssistAnswer resource, main part of AssistResponse. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting assistant session.
        &quot;assistSkippedReasons&quot;: [ # Reasons for not answering the assist call.
          &quot;A String&quot;,
        ],
        &quot;customerPolicyEnforcementResult&quot;: { # Customer policy enforcement results. Contains the results of the various policy checks, like the banned phrases or the Model Armor checks. # Optional. The field contains information about the various policy checks&#x27; results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.
          &quot;policyResults&quot;: [ # Customer policy enforcement results. Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.
            { # Customer policy enforcement result for a single policy type.
              &quot;bannedPhraseEnforcementResult&quot;: { # Customer policy enforcement result for the banned phrase policy. # The policy enforcement result for the banned phrase policy.
                &quot;bannedPhrases&quot;: [ # The banned phrases that were found in the query or the answer.
                  &quot;A String&quot;,
                ],
              },
              &quot;modelArmorEnforcementResult&quot;: { # Customer policy enforcement result for the Model Armor policy. # The policy enforcement result for the Model Armor policy.
                &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error returned by Model Armor if the policy enforcement failed for some reason.
                  &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
                  &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                    {
                      &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
                    },
                  ],
                  &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
                },
                &quot;modelArmorViolation&quot;: &quot;A String&quot;, # The Model Armor violation that was found.
              },
            },
          ],
          &quot;verdict&quot;: &quot;A String&quot;, # Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.
        },
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Identifier. Resource name of the `AssistAnswer`. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` This field must be a UTF-8 encoded string with a length limit of 1024 characters.
        &quot;replies&quot;: [ # Replies of the assistant.
          { # One part of the multi-part response of the assist call.
            &quot;groundedContent&quot;: { # A piece of content and possibly its grounding information. Not all content needs grounding. Phrases like &quot;Of course, I will gladly search it for you.&quot; do not need grounding. # Possibly grounded response text or media from the assistant.
              &quot;citationMetadata&quot;: { # A collection of source attributions for a piece of content. # Source attribution of the generated content. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
                &quot;citations&quot;: [ # Output only. List of citations.
                  { # Source attributions for content.
                    &quot;endIndex&quot;: 42, # Output only. End index into the content.
                    &quot;license&quot;: &quot;A String&quot;, # Output only. License of the attribution.
                    &quot;publicationDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Publication date of the attribution.
                      &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
                      &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
                      &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
                    },
                    &quot;startIndex&quot;: 42, # Output only. Start index into the content.
                    &quot;title&quot;: &quot;A String&quot;, # Output only. Title of the attribution.
                    &quot;uri&quot;: &quot;A String&quot;, # Output only. Url reference of the attribution.
                  },
                ],
              },
              &quot;content&quot;: { # Multi-modal content. # The content.
                &quot;codeExecutionResult&quot;: { # Result of executing ExecutableCode. # Result of executing an ExecutableCode.
                  &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
                  &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
                },
                &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed by the model. # Code generated by the model that is meant to be executed.
                  &quot;code&quot;: &quot;A String&quot;, # Required. The code content. Currently only supports Python.
                },
                &quot;file&quot;: { # A file, e.g., an audio summary. # A file, e.g., an audio summary.
                  &quot;fileId&quot;: &quot;A String&quot;, # Required. The file ID.
                  &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the file.
                },
                &quot;inlineData&quot;: { # Inline blob. # Inline binary data.
                  &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
                  &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the generated data.
                },
                &quot;role&quot;: &quot;A String&quot;, # The producer of the content. Can be &quot;model&quot; or &quot;user&quot;.
                &quot;text&quot;: &quot;A String&quot;, # Inline text.
                &quot;thought&quot;: True or False, # Optional. Indicates if the part is thought from the model.
              },
              &quot;textGroundingMetadata&quot;: { # Grounding details for text sources. # Metadata for grounding based on text sources.
                &quot;references&quot;: [ # References for the grounded text.
                  { # Referenced content and related document metadata.
                    &quot;content&quot;: &quot;A String&quot;, # Referenced text content.
                    &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                      &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                      &quot;domain&quot;: &quot;A String&quot;, # Domain name from the document URI. Note that the `uri` field may contain a URL that redirects to the actual website, in which case this will contain the domain name of the target site.
                      &quot;mimeType&quot;: &quot;A String&quot;, # The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml.
                      &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                      &quot;title&quot;: &quot;A String&quot;, # Title.
                      &quot;uri&quot;: &quot;A String&quot;, # URI for the document. It may contain a URL that redirects to the actual website.
                    },
                  },
                ],
                &quot;segments&quot;: [ # Grounding information for parts of the text.
                  { # Grounding information for a segment of the text.
                    &quot;endIndex&quot;: &quot;A String&quot;, # End of the segment, exclusive.
                    &quot;groundingScore&quot;: 3.14, # Score for the segment.
                    &quot;referenceIndices&quot;: [ # References for the segment.
                      42,
                    ],
                    &quot;startIndex&quot;: &quot;A String&quot;, # Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
                    &quot;text&quot;: &quot;A String&quot;, # The text segment itself.
                  },
                ],
              },
            },
          },
        ],
        &quot;state&quot;: &quot;A String&quot;, # State of the answer generation.
      },
      &quot;query&quot;: { # Defines a user inputed query. # Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn
        &quot;queryId&quot;: &quot;A String&quot;, # Output only. Unique Id for the query.
        &quot;text&quot;: &quot;A String&quot;, # Plain text.
      },
      &quot;queryConfig&quot;: { # Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix &quot;google.&quot; is reserved for Google-developed functionality.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
    },
  ],
  &quot;userPseudoId&quot;: &quot;A String&quot;, # A unique identifier for tracking users.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # External session proto definition.
  &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
  &quot;endTime&quot;: &quot;A String&quot;, # Output only. The time the session finished.
  &quot;isPinned&quot;: True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
  &quot;labels&quot;: [ # Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
    &quot;A String&quot;,
  ],
  &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
  &quot;startTime&quot;: &quot;A String&quot;, # Output only. The time the session started.
  &quot;state&quot;: &quot;A String&quot;, # The state of the session.
  &quot;turns&quot;: [ # Turns.
    { # Represents a turn, including a query from the user and a answer from service.
      &quot;answer&quot;: &quot;A String&quot;, # Optional. The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
      &quot;detailedAnswer&quot;: { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
        &quot;answerSkippedReasons&quot;: [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
          &quot;A String&quot;,
        ],
        &quot;answerText&quot;: &quot;A String&quot;, # The textual answer.
        &quot;citations&quot;: [ # Citations.
          { # Citation info for a segment.
            &quot;endIndex&quot;: &quot;A String&quot;, # End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
            &quot;sources&quot;: [ # Citation sources for the attributed segment.
              { # Citation source.
                &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
              },
            ],
            &quot;startIndex&quot;: &quot;A String&quot;, # Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
          },
        ],
        &quot;completeTime&quot;: &quot;A String&quot;, # Output only. Answer completed timestamp.
        &quot;createTime&quot;: &quot;A String&quot;, # Output only. Answer creation timestamp.
        &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
        &quot;groundingSupports&quot;: [ # Optional. Grounding supports.
          { # Grounding support for a claim in `answer_text`.
            &quot;endIndex&quot;: &quot;A String&quot;, # Required. End of the claim, exclusive.
            &quot;groundingCheckRequired&quot;: True or False, # Indicates that this claim required grounding check. When the system decided this claim didn&#x27;t require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
            &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
            &quot;sources&quot;: [ # Optional. Citation sources for the claim.
              { # Citation source.
                &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
              },
            ],
            &quot;startIndex&quot;: &quot;A String&quot;, # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
          },
        ],
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
        &quot;queryUnderstandingInfo&quot;: { # Query understanding information. # Query understanding information.
          &quot;queryClassificationInfo&quot;: [ # Query classification information.
            { # Query classification information.
              &quot;positive&quot;: True or False, # Classification output.
              &quot;type&quot;: &quot;A String&quot;, # Query classification type.
            },
          ],
        },
        &quot;references&quot;: [ # References.
          { # Reference.
            &quot;chunkInfo&quot;: { # Chunk information. # Chunk information.
              &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
              &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
              &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;title&quot;: &quot;A String&quot;, # Title.
                &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
              },
              &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
            },
            &quot;structuredDocumentInfo&quot;: { # Structured search information. # Structured document information.
              &quot;document&quot;: &quot;A String&quot;, # Document resource name.
              &quot;structData&quot;: { # Structured search data.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;title&quot;: &quot;A String&quot;, # Output only. The title of the document.
              &quot;uri&quot;: &quot;A String&quot;, # Output only. The URI of the document.
            },
            &quot;unstructuredDocumentInfo&quot;: { # Unstructured document information. # Unstructured document information.
              &quot;chunkContents&quot;: [ # List of cited chunk contents derived from document content.
                { # Chunk content.
                  &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                  &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                  &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                },
              ],
              &quot;document&quot;: &quot;A String&quot;, # Document resource name.
              &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;title&quot;: &quot;A String&quot;, # Title.
              &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
            },
          },
        ],
        &quot;relatedQuestions&quot;: [ # Suggested related questions.
          &quot;A String&quot;,
        ],
        &quot;safetyRatings&quot;: [ # Optional. Safety ratings.
          { # Safety rating corresponding to the generated content.
            &quot;blocked&quot;: True or False, # Output only. Indicates whether the content was filtered out because of this rating.
            &quot;category&quot;: &quot;A String&quot;, # Output only. Harm category.
            &quot;probability&quot;: &quot;A String&quot;, # Output only. Harm probability levels in the content.
            &quot;probabilityScore&quot;: 3.14, # Output only. Harm probability score.
            &quot;severity&quot;: &quot;A String&quot;, # Output only. Harm severity levels in the content.
            &quot;severityScore&quot;: 3.14, # Output only. Harm severity score.
          },
        ],
        &quot;state&quot;: &quot;A String&quot;, # The state of the answer generation.
        &quot;steps&quot;: [ # Answer generation steps.
          { # Step information.
            &quot;actions&quot;: [ # Actions.
              { # Action.
                &quot;observation&quot;: { # Observation. # Observation.
                  &quot;searchResults&quot;: [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
                    {
                      &quot;chunkInfo&quot;: [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
                        { # Chunk information.
                          &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
                          &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                          &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                        },
                      ],
                      &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                      &quot;snippetInfo&quot;: [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
                        { # Snippet information.
                          &quot;snippet&quot;: &quot;A String&quot;, # Snippet content.
                          &quot;snippetStatus&quot;: &quot;A String&quot;, # Status of the snippet defined by the search team.
                        },
                      ],
                      &quot;structData&quot;: { # Data representation. The structured JSON data for the document. It&#x27;s populated from the struct data from the Document, or the Chunk in search result.
                        &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                      },
                      &quot;title&quot;: &quot;A String&quot;, # Title.
                      &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
                    },
                  ],
                },
                &quot;searchAction&quot;: { # Search action. # Search action.
                  &quot;query&quot;: &quot;A String&quot;, # The query to search.
                },
              },
            ],
            &quot;description&quot;: &quot;A String&quot;, # The description of the step.
            &quot;state&quot;: &quot;A String&quot;, # The state of the step.
            &quot;thought&quot;: &quot;A String&quot;, # The thought of the step.
          },
        ],
      },
      &quot;detailedAssistAnswer&quot;: { # AssistAnswer resource, main part of AssistResponse. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting assistant session.
        &quot;assistSkippedReasons&quot;: [ # Reasons for not answering the assist call.
          &quot;A String&quot;,
        ],
        &quot;customerPolicyEnforcementResult&quot;: { # Customer policy enforcement results. Contains the results of the various policy checks, like the banned phrases or the Model Armor checks. # Optional. The field contains information about the various policy checks&#x27; results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.
          &quot;policyResults&quot;: [ # Customer policy enforcement results. Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.
            { # Customer policy enforcement result for a single policy type.
              &quot;bannedPhraseEnforcementResult&quot;: { # Customer policy enforcement result for the banned phrase policy. # The policy enforcement result for the banned phrase policy.
                &quot;bannedPhrases&quot;: [ # The banned phrases that were found in the query or the answer.
                  &quot;A String&quot;,
                ],
              },
              &quot;modelArmorEnforcementResult&quot;: { # Customer policy enforcement result for the Model Armor policy. # The policy enforcement result for the Model Armor policy.
                &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error returned by Model Armor if the policy enforcement failed for some reason.
                  &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
                  &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                    {
                      &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
                    },
                  ],
                  &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
                },
                &quot;modelArmorViolation&quot;: &quot;A String&quot;, # The Model Armor violation that was found.
              },
            },
          ],
          &quot;verdict&quot;: &quot;A String&quot;, # Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.
        },
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Identifier. Resource name of the `AssistAnswer`. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` This field must be a UTF-8 encoded string with a length limit of 1024 characters.
        &quot;replies&quot;: [ # Replies of the assistant.
          { # One part of the multi-part response of the assist call.
            &quot;groundedContent&quot;: { # A piece of content and possibly its grounding information. Not all content needs grounding. Phrases like &quot;Of course, I will gladly search it for you.&quot; do not need grounding. # Possibly grounded response text or media from the assistant.
              &quot;citationMetadata&quot;: { # A collection of source attributions for a piece of content. # Source attribution of the generated content. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
                &quot;citations&quot;: [ # Output only. List of citations.
                  { # Source attributions for content.
                    &quot;endIndex&quot;: 42, # Output only. End index into the content.
                    &quot;license&quot;: &quot;A String&quot;, # Output only. License of the attribution.
                    &quot;publicationDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Publication date of the attribution.
                      &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
                      &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
                      &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
                    },
                    &quot;startIndex&quot;: 42, # Output only. Start index into the content.
                    &quot;title&quot;: &quot;A String&quot;, # Output only. Title of the attribution.
                    &quot;uri&quot;: &quot;A String&quot;, # Output only. Url reference of the attribution.
                  },
                ],
              },
              &quot;content&quot;: { # Multi-modal content. # The content.
                &quot;codeExecutionResult&quot;: { # Result of executing ExecutableCode. # Result of executing an ExecutableCode.
                  &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
                  &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
                },
                &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed by the model. # Code generated by the model that is meant to be executed.
                  &quot;code&quot;: &quot;A String&quot;, # Required. The code content. Currently only supports Python.
                },
                &quot;file&quot;: { # A file, e.g., an audio summary. # A file, e.g., an audio summary.
                  &quot;fileId&quot;: &quot;A String&quot;, # Required. The file ID.
                  &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the file.
                },
                &quot;inlineData&quot;: { # Inline blob. # Inline binary data.
                  &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
                  &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the generated data.
                },
                &quot;role&quot;: &quot;A String&quot;, # The producer of the content. Can be &quot;model&quot; or &quot;user&quot;.
                &quot;text&quot;: &quot;A String&quot;, # Inline text.
                &quot;thought&quot;: True or False, # Optional. Indicates if the part is thought from the model.
              },
              &quot;textGroundingMetadata&quot;: { # Grounding details for text sources. # Metadata for grounding based on text sources.
                &quot;references&quot;: [ # References for the grounded text.
                  { # Referenced content and related document metadata.
                    &quot;content&quot;: &quot;A String&quot;, # Referenced text content.
                    &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                      &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                      &quot;domain&quot;: &quot;A String&quot;, # Domain name from the document URI. Note that the `uri` field may contain a URL that redirects to the actual website, in which case this will contain the domain name of the target site.
                      &quot;mimeType&quot;: &quot;A String&quot;, # The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml.
                      &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                      &quot;title&quot;: &quot;A String&quot;, # Title.
                      &quot;uri&quot;: &quot;A String&quot;, # URI for the document. It may contain a URL that redirects to the actual website.
                    },
                  },
                ],
                &quot;segments&quot;: [ # Grounding information for parts of the text.
                  { # Grounding information for a segment of the text.
                    &quot;endIndex&quot;: &quot;A String&quot;, # End of the segment, exclusive.
                    &quot;groundingScore&quot;: 3.14, # Score for the segment.
                    &quot;referenceIndices&quot;: [ # References for the segment.
                      42,
                    ],
                    &quot;startIndex&quot;: &quot;A String&quot;, # Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
                    &quot;text&quot;: &quot;A String&quot;, # The text segment itself.
                  },
                ],
              },
            },
          },
        ],
        &quot;state&quot;: &quot;A String&quot;, # State of the answer generation.
      },
      &quot;query&quot;: { # Defines a user inputed query. # Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn
        &quot;queryId&quot;: &quot;A String&quot;, # Output only. Unique Id for the query.
        &quot;text&quot;: &quot;A String&quot;, # Plain text.
      },
      &quot;queryConfig&quot;: { # Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix &quot;google.&quot; is reserved for Google-developed functionality.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
    },
  ],
  &quot;userPseudoId&quot;: &quot;A String&quot;, # A unique identifier for tracking users.
}</pre>
</div>

<div class="method">
    <code class="details" id="delete">delete(name, x__xgafv=None)</code>
  <pre>Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.

Args:
  name: string, Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, includeAnswerDetails=None, x__xgafv=None)</code>
  <pre>Gets a Session.

Args:
  name: string, Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` (required)
  includeAnswerDetails: boolean, Optional. If set to true, the full session including all answer details will be returned.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # External session proto definition.
  &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
  &quot;endTime&quot;: &quot;A String&quot;, # Output only. The time the session finished.
  &quot;isPinned&quot;: True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
  &quot;labels&quot;: [ # Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
    &quot;A String&quot;,
  ],
  &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
  &quot;startTime&quot;: &quot;A String&quot;, # Output only. The time the session started.
  &quot;state&quot;: &quot;A String&quot;, # The state of the session.
  &quot;turns&quot;: [ # Turns.
    { # Represents a turn, including a query from the user and a answer from service.
      &quot;answer&quot;: &quot;A String&quot;, # Optional. The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
      &quot;detailedAnswer&quot;: { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
        &quot;answerSkippedReasons&quot;: [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
          &quot;A String&quot;,
        ],
        &quot;answerText&quot;: &quot;A String&quot;, # The textual answer.
        &quot;citations&quot;: [ # Citations.
          { # Citation info for a segment.
            &quot;endIndex&quot;: &quot;A String&quot;, # End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
            &quot;sources&quot;: [ # Citation sources for the attributed segment.
              { # Citation source.
                &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
              },
            ],
            &quot;startIndex&quot;: &quot;A String&quot;, # Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
          },
        ],
        &quot;completeTime&quot;: &quot;A String&quot;, # Output only. Answer completed timestamp.
        &quot;createTime&quot;: &quot;A String&quot;, # Output only. Answer creation timestamp.
        &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
        &quot;groundingSupports&quot;: [ # Optional. Grounding supports.
          { # Grounding support for a claim in `answer_text`.
            &quot;endIndex&quot;: &quot;A String&quot;, # Required. End of the claim, exclusive.
            &quot;groundingCheckRequired&quot;: True or False, # Indicates that this claim required grounding check. When the system decided this claim didn&#x27;t require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
            &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
            &quot;sources&quot;: [ # Optional. Citation sources for the claim.
              { # Citation source.
                &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
              },
            ],
            &quot;startIndex&quot;: &quot;A String&quot;, # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
          },
        ],
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
        &quot;queryUnderstandingInfo&quot;: { # Query understanding information. # Query understanding information.
          &quot;queryClassificationInfo&quot;: [ # Query classification information.
            { # Query classification information.
              &quot;positive&quot;: True or False, # Classification output.
              &quot;type&quot;: &quot;A String&quot;, # Query classification type.
            },
          ],
        },
        &quot;references&quot;: [ # References.
          { # Reference.
            &quot;chunkInfo&quot;: { # Chunk information. # Chunk information.
              &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
              &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
              &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;title&quot;: &quot;A String&quot;, # Title.
                &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
              },
              &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
            },
            &quot;structuredDocumentInfo&quot;: { # Structured search information. # Structured document information.
              &quot;document&quot;: &quot;A String&quot;, # Document resource name.
              &quot;structData&quot;: { # Structured search data.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;title&quot;: &quot;A String&quot;, # Output only. The title of the document.
              &quot;uri&quot;: &quot;A String&quot;, # Output only. The URI of the document.
            },
            &quot;unstructuredDocumentInfo&quot;: { # Unstructured document information. # Unstructured document information.
              &quot;chunkContents&quot;: [ # List of cited chunk contents derived from document content.
                { # Chunk content.
                  &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                  &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                  &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                },
              ],
              &quot;document&quot;: &quot;A String&quot;, # Document resource name.
              &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;title&quot;: &quot;A String&quot;, # Title.
              &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
            },
          },
        ],
        &quot;relatedQuestions&quot;: [ # Suggested related questions.
          &quot;A String&quot;,
        ],
        &quot;safetyRatings&quot;: [ # Optional. Safety ratings.
          { # Safety rating corresponding to the generated content.
            &quot;blocked&quot;: True or False, # Output only. Indicates whether the content was filtered out because of this rating.
            &quot;category&quot;: &quot;A String&quot;, # Output only. Harm category.
            &quot;probability&quot;: &quot;A String&quot;, # Output only. Harm probability levels in the content.
            &quot;probabilityScore&quot;: 3.14, # Output only. Harm probability score.
            &quot;severity&quot;: &quot;A String&quot;, # Output only. Harm severity levels in the content.
            &quot;severityScore&quot;: 3.14, # Output only. Harm severity score.
          },
        ],
        &quot;state&quot;: &quot;A String&quot;, # The state of the answer generation.
        &quot;steps&quot;: [ # Answer generation steps.
          { # Step information.
            &quot;actions&quot;: [ # Actions.
              { # Action.
                &quot;observation&quot;: { # Observation. # Observation.
                  &quot;searchResults&quot;: [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
                    {
                      &quot;chunkInfo&quot;: [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
                        { # Chunk information.
                          &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
                          &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                          &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                        },
                      ],
                      &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                      &quot;snippetInfo&quot;: [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
                        { # Snippet information.
                          &quot;snippet&quot;: &quot;A String&quot;, # Snippet content.
                          &quot;snippetStatus&quot;: &quot;A String&quot;, # Status of the snippet defined by the search team.
                        },
                      ],
                      &quot;structData&quot;: { # Data representation. The structured JSON data for the document. It&#x27;s populated from the struct data from the Document, or the Chunk in search result.
                        &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                      },
                      &quot;title&quot;: &quot;A String&quot;, # Title.
                      &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
                    },
                  ],
                },
                &quot;searchAction&quot;: { # Search action. # Search action.
                  &quot;query&quot;: &quot;A String&quot;, # The query to search.
                },
              },
            ],
            &quot;description&quot;: &quot;A String&quot;, # The description of the step.
            &quot;state&quot;: &quot;A String&quot;, # The state of the step.
            &quot;thought&quot;: &quot;A String&quot;, # The thought of the step.
          },
        ],
      },
      &quot;detailedAssistAnswer&quot;: { # AssistAnswer resource, main part of AssistResponse. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting assistant session.
        &quot;assistSkippedReasons&quot;: [ # Reasons for not answering the assist call.
          &quot;A String&quot;,
        ],
        &quot;customerPolicyEnforcementResult&quot;: { # Customer policy enforcement results. Contains the results of the various policy checks, like the banned phrases or the Model Armor checks. # Optional. The field contains information about the various policy checks&#x27; results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.
          &quot;policyResults&quot;: [ # Customer policy enforcement results. Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.
            { # Customer policy enforcement result for a single policy type.
              &quot;bannedPhraseEnforcementResult&quot;: { # Customer policy enforcement result for the banned phrase policy. # The policy enforcement result for the banned phrase policy.
                &quot;bannedPhrases&quot;: [ # The banned phrases that were found in the query or the answer.
                  &quot;A String&quot;,
                ],
              },
              &quot;modelArmorEnforcementResult&quot;: { # Customer policy enforcement result for the Model Armor policy. # The policy enforcement result for the Model Armor policy.
                &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error returned by Model Armor if the policy enforcement failed for some reason.
                  &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
                  &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                    {
                      &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
                    },
                  ],
                  &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
                },
                &quot;modelArmorViolation&quot;: &quot;A String&quot;, # The Model Armor violation that was found.
              },
            },
          ],
          &quot;verdict&quot;: &quot;A String&quot;, # Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.
        },
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Identifier. Resource name of the `AssistAnswer`. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` This field must be a UTF-8 encoded string with a length limit of 1024 characters.
        &quot;replies&quot;: [ # Replies of the assistant.
          { # One part of the multi-part response of the assist call.
            &quot;groundedContent&quot;: { # A piece of content and possibly its grounding information. Not all content needs grounding. Phrases like &quot;Of course, I will gladly search it for you.&quot; do not need grounding. # Possibly grounded response text or media from the assistant.
              &quot;citationMetadata&quot;: { # A collection of source attributions for a piece of content. # Source attribution of the generated content. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
                &quot;citations&quot;: [ # Output only. List of citations.
                  { # Source attributions for content.
                    &quot;endIndex&quot;: 42, # Output only. End index into the content.
                    &quot;license&quot;: &quot;A String&quot;, # Output only. License of the attribution.
                    &quot;publicationDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Publication date of the attribution.
                      &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
                      &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
                      &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
                    },
                    &quot;startIndex&quot;: 42, # Output only. Start index into the content.
                    &quot;title&quot;: &quot;A String&quot;, # Output only. Title of the attribution.
                    &quot;uri&quot;: &quot;A String&quot;, # Output only. Url reference of the attribution.
                  },
                ],
              },
              &quot;content&quot;: { # Multi-modal content. # The content.
                &quot;codeExecutionResult&quot;: { # Result of executing ExecutableCode. # Result of executing an ExecutableCode.
                  &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
                  &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
                },
                &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed by the model. # Code generated by the model that is meant to be executed.
                  &quot;code&quot;: &quot;A String&quot;, # Required. The code content. Currently only supports Python.
                },
                &quot;file&quot;: { # A file, e.g., an audio summary. # A file, e.g., an audio summary.
                  &quot;fileId&quot;: &quot;A String&quot;, # Required. The file ID.
                  &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the file.
                },
                &quot;inlineData&quot;: { # Inline blob. # Inline binary data.
                  &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
                  &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the generated data.
                },
                &quot;role&quot;: &quot;A String&quot;, # The producer of the content. Can be &quot;model&quot; or &quot;user&quot;.
                &quot;text&quot;: &quot;A String&quot;, # Inline text.
                &quot;thought&quot;: True or False, # Optional. Indicates if the part is thought from the model.
              },
              &quot;textGroundingMetadata&quot;: { # Grounding details for text sources. # Metadata for grounding based on text sources.
                &quot;references&quot;: [ # References for the grounded text.
                  { # Referenced content and related document metadata.
                    &quot;content&quot;: &quot;A String&quot;, # Referenced text content.
                    &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                      &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                      &quot;domain&quot;: &quot;A String&quot;, # Domain name from the document URI. Note that the `uri` field may contain a URL that redirects to the actual website, in which case this will contain the domain name of the target site.
                      &quot;mimeType&quot;: &quot;A String&quot;, # The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml.
                      &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                      &quot;title&quot;: &quot;A String&quot;, # Title.
                      &quot;uri&quot;: &quot;A String&quot;, # URI for the document. It may contain a URL that redirects to the actual website.
                    },
                  },
                ],
                &quot;segments&quot;: [ # Grounding information for parts of the text.
                  { # Grounding information for a segment of the text.
                    &quot;endIndex&quot;: &quot;A String&quot;, # End of the segment, exclusive.
                    &quot;groundingScore&quot;: 3.14, # Score for the segment.
                    &quot;referenceIndices&quot;: [ # References for the segment.
                      42,
                    ],
                    &quot;startIndex&quot;: &quot;A String&quot;, # Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
                    &quot;text&quot;: &quot;A String&quot;, # The text segment itself.
                  },
                ],
              },
            },
          },
        ],
        &quot;state&quot;: &quot;A String&quot;, # State of the answer generation.
      },
      &quot;query&quot;: { # Defines a user inputed query. # Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn
        &quot;queryId&quot;: &quot;A String&quot;, # Output only. Unique Id for the query.
        &quot;text&quot;: &quot;A String&quot;, # Plain text.
      },
      &quot;queryConfig&quot;: { # Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix &quot;google.&quot; is reserved for Google-developed functionality.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
    },
  ],
  &quot;userPseudoId&quot;: &quot;A String&quot;, # A unique identifier for tracking users.
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>Lists all Sessions by their parent DataStore.

Args:
  parent: string, Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}` (required)
  filter: string, A comma-separated list of fields to filter by, in EBNF grammar. The supported fields are: * `user_pseudo_id` * `state` * `display_name` * `starred` * `is_pinned` * `labels` * `create_time` * `update_time` Examples: * `user_pseudo_id = some_id` * `display_name = &quot;some_name&quot;` * `starred = true` * `is_pinned=true AND (NOT labels:hidden)` * `create_time &gt; &quot;1970-01-01T12:00:00Z&quot;`
  orderBy: string, A comma-separated list of fields to order by, sorted in ascending order. Use &quot;desc&quot; after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` * `is_pinned` Example: * `update_time desc` * `create_time` * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then by update_time.
  pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.
  pageToken: string, A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for ListSessions method.
  &quot;nextPageToken&quot;: &quot;A String&quot;, # Pagination token, if not returned indicates the last page.
  &quot;sessions&quot;: [ # All the Sessions for a given data store.
    { # External session proto definition.
      &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
      &quot;endTime&quot;: &quot;A String&quot;, # Output only. The time the session finished.
      &quot;isPinned&quot;: True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
      &quot;labels&quot;: [ # Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
        &quot;A String&quot;,
      ],
      &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
      &quot;startTime&quot;: &quot;A String&quot;, # Output only. The time the session started.
      &quot;state&quot;: &quot;A String&quot;, # The state of the session.
      &quot;turns&quot;: [ # Turns.
        { # Represents a turn, including a query from the user and a answer from service.
          &quot;answer&quot;: &quot;A String&quot;, # Optional. The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
          &quot;detailedAnswer&quot;: { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
            &quot;answerSkippedReasons&quot;: [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
              &quot;A String&quot;,
            ],
            &quot;answerText&quot;: &quot;A String&quot;, # The textual answer.
            &quot;citations&quot;: [ # Citations.
              { # Citation info for a segment.
                &quot;endIndex&quot;: &quot;A String&quot;, # End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
                &quot;sources&quot;: [ # Citation sources for the attributed segment.
                  { # Citation source.
                    &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
                  },
                ],
                &quot;startIndex&quot;: &quot;A String&quot;, # Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
              },
            ],
            &quot;completeTime&quot;: &quot;A String&quot;, # Output only. Answer completed timestamp.
            &quot;createTime&quot;: &quot;A String&quot;, # Output only. Answer creation timestamp.
            &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
            &quot;groundingSupports&quot;: [ # Optional. Grounding supports.
              { # Grounding support for a claim in `answer_text`.
                &quot;endIndex&quot;: &quot;A String&quot;, # Required. End of the claim, exclusive.
                &quot;groundingCheckRequired&quot;: True or False, # Indicates that this claim required grounding check. When the system decided this claim didn&#x27;t require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
                &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
                &quot;sources&quot;: [ # Optional. Citation sources for the claim.
                  { # Citation source.
                    &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
                  },
                ],
                &quot;startIndex&quot;: &quot;A String&quot;, # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
              },
            ],
            &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            &quot;queryUnderstandingInfo&quot;: { # Query understanding information. # Query understanding information.
              &quot;queryClassificationInfo&quot;: [ # Query classification information.
                { # Query classification information.
                  &quot;positive&quot;: True or False, # Classification output.
                  &quot;type&quot;: &quot;A String&quot;, # Query classification type.
                },
              ],
            },
            &quot;references&quot;: [ # References.
              { # Reference.
                &quot;chunkInfo&quot;: { # Chunk information. # Chunk information.
                  &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
                  &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                  &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                    &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                    &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                    &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                      &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                    },
                    &quot;title&quot;: &quot;A String&quot;, # Title.
                    &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
                  },
                  &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                },
                &quot;structuredDocumentInfo&quot;: { # Structured search information. # Structured document information.
                  &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                  &quot;structData&quot;: { # Structured search data.
                    &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                  },
                  &quot;title&quot;: &quot;A String&quot;, # Output only. The title of the document.
                  &quot;uri&quot;: &quot;A String&quot;, # Output only. The URI of the document.
                },
                &quot;unstructuredDocumentInfo&quot;: { # Unstructured document information. # Unstructured document information.
                  &quot;chunkContents&quot;: [ # List of cited chunk contents derived from document content.
                    { # Chunk content.
                      &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                      &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                      &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                    },
                  ],
                  &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                  &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                    &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                  },
                  &quot;title&quot;: &quot;A String&quot;, # Title.
                  &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
                },
              },
            ],
            &quot;relatedQuestions&quot;: [ # Suggested related questions.
              &quot;A String&quot;,
            ],
            &quot;safetyRatings&quot;: [ # Optional. Safety ratings.
              { # Safety rating corresponding to the generated content.
                &quot;blocked&quot;: True or False, # Output only. Indicates whether the content was filtered out because of this rating.
                &quot;category&quot;: &quot;A String&quot;, # Output only. Harm category.
                &quot;probability&quot;: &quot;A String&quot;, # Output only. Harm probability levels in the content.
                &quot;probabilityScore&quot;: 3.14, # Output only. Harm probability score.
                &quot;severity&quot;: &quot;A String&quot;, # Output only. Harm severity levels in the content.
                &quot;severityScore&quot;: 3.14, # Output only. Harm severity score.
              },
            ],
            &quot;state&quot;: &quot;A String&quot;, # The state of the answer generation.
            &quot;steps&quot;: [ # Answer generation steps.
              { # Step information.
                &quot;actions&quot;: [ # Actions.
                  { # Action.
                    &quot;observation&quot;: { # Observation. # Observation.
                      &quot;searchResults&quot;: [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
                        {
                          &quot;chunkInfo&quot;: [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
                            { # Chunk information.
                              &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
                              &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                              &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                            },
                          ],
                          &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                          &quot;snippetInfo&quot;: [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
                            { # Snippet information.
                              &quot;snippet&quot;: &quot;A String&quot;, # Snippet content.
                              &quot;snippetStatus&quot;: &quot;A String&quot;, # Status of the snippet defined by the search team.
                            },
                          ],
                          &quot;structData&quot;: { # Data representation. The structured JSON data for the document. It&#x27;s populated from the struct data from the Document, or the Chunk in search result.
                            &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                          },
                          &quot;title&quot;: &quot;A String&quot;, # Title.
                          &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
                        },
                      ],
                    },
                    &quot;searchAction&quot;: { # Search action. # Search action.
                      &quot;query&quot;: &quot;A String&quot;, # The query to search.
                    },
                  },
                ],
                &quot;description&quot;: &quot;A String&quot;, # The description of the step.
                &quot;state&quot;: &quot;A String&quot;, # The state of the step.
                &quot;thought&quot;: &quot;A String&quot;, # The thought of the step.
              },
            ],
          },
          &quot;detailedAssistAnswer&quot;: { # AssistAnswer resource, main part of AssistResponse. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting assistant session.
            &quot;assistSkippedReasons&quot;: [ # Reasons for not answering the assist call.
              &quot;A String&quot;,
            ],
            &quot;customerPolicyEnforcementResult&quot;: { # Customer policy enforcement results. Contains the results of the various policy checks, like the banned phrases or the Model Armor checks. # Optional. The field contains information about the various policy checks&#x27; results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.
              &quot;policyResults&quot;: [ # Customer policy enforcement results. Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.
                { # Customer policy enforcement result for a single policy type.
                  &quot;bannedPhraseEnforcementResult&quot;: { # Customer policy enforcement result for the banned phrase policy. # The policy enforcement result for the banned phrase policy.
                    &quot;bannedPhrases&quot;: [ # The banned phrases that were found in the query or the answer.
                      &quot;A String&quot;,
                    ],
                  },
                  &quot;modelArmorEnforcementResult&quot;: { # Customer policy enforcement result for the Model Armor policy. # The policy enforcement result for the Model Armor policy.
                    &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error returned by Model Armor if the policy enforcement failed for some reason.
                      &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
                      &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                        {
                          &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
                        },
                      ],
                      &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
                    },
                    &quot;modelArmorViolation&quot;: &quot;A String&quot;, # The Model Armor violation that was found.
                  },
                },
              ],
              &quot;verdict&quot;: &quot;A String&quot;, # Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.
            },
            &quot;name&quot;: &quot;A String&quot;, # Immutable. Identifier. Resource name of the `AssistAnswer`. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` This field must be a UTF-8 encoded string with a length limit of 1024 characters.
            &quot;replies&quot;: [ # Replies of the assistant.
              { # One part of the multi-part response of the assist call.
                &quot;groundedContent&quot;: { # A piece of content and possibly its grounding information. Not all content needs grounding. Phrases like &quot;Of course, I will gladly search it for you.&quot; do not need grounding. # Possibly grounded response text or media from the assistant.
                  &quot;citationMetadata&quot;: { # A collection of source attributions for a piece of content. # Source attribution of the generated content. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
                    &quot;citations&quot;: [ # Output only. List of citations.
                      { # Source attributions for content.
                        &quot;endIndex&quot;: 42, # Output only. End index into the content.
                        &quot;license&quot;: &quot;A String&quot;, # Output only. License of the attribution.
                        &quot;publicationDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Publication date of the attribution.
                          &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
                          &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
                          &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
                        },
                        &quot;startIndex&quot;: 42, # Output only. Start index into the content.
                        &quot;title&quot;: &quot;A String&quot;, # Output only. Title of the attribution.
                        &quot;uri&quot;: &quot;A String&quot;, # Output only. Url reference of the attribution.
                      },
                    ],
                  },
                  &quot;content&quot;: { # Multi-modal content. # The content.
                    &quot;codeExecutionResult&quot;: { # Result of executing ExecutableCode. # Result of executing an ExecutableCode.
                      &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
                      &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
                    },
                    &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed by the model. # Code generated by the model that is meant to be executed.
                      &quot;code&quot;: &quot;A String&quot;, # Required. The code content. Currently only supports Python.
                    },
                    &quot;file&quot;: { # A file, e.g., an audio summary. # A file, e.g., an audio summary.
                      &quot;fileId&quot;: &quot;A String&quot;, # Required. The file ID.
                      &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the file.
                    },
                    &quot;inlineData&quot;: { # Inline blob. # Inline binary data.
                      &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
                      &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the generated data.
                    },
                    &quot;role&quot;: &quot;A String&quot;, # The producer of the content. Can be &quot;model&quot; or &quot;user&quot;.
                    &quot;text&quot;: &quot;A String&quot;, # Inline text.
                    &quot;thought&quot;: True or False, # Optional. Indicates if the part is thought from the model.
                  },
                  &quot;textGroundingMetadata&quot;: { # Grounding details for text sources. # Metadata for grounding based on text sources.
                    &quot;references&quot;: [ # References for the grounded text.
                      { # Referenced content and related document metadata.
                        &quot;content&quot;: &quot;A String&quot;, # Referenced text content.
                        &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                          &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                          &quot;domain&quot;: &quot;A String&quot;, # Domain name from the document URI. Note that the `uri` field may contain a URL that redirects to the actual website, in which case this will contain the domain name of the target site.
                          &quot;mimeType&quot;: &quot;A String&quot;, # The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml.
                          &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                          &quot;title&quot;: &quot;A String&quot;, # Title.
                          &quot;uri&quot;: &quot;A String&quot;, # URI for the document. It may contain a URL that redirects to the actual website.
                        },
                      },
                    ],
                    &quot;segments&quot;: [ # Grounding information for parts of the text.
                      { # Grounding information for a segment of the text.
                        &quot;endIndex&quot;: &quot;A String&quot;, # End of the segment, exclusive.
                        &quot;groundingScore&quot;: 3.14, # Score for the segment.
                        &quot;referenceIndices&quot;: [ # References for the segment.
                          42,
                        ],
                        &quot;startIndex&quot;: &quot;A String&quot;, # Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
                        &quot;text&quot;: &quot;A String&quot;, # The text segment itself.
                      },
                    ],
                  },
                },
              },
            ],
            &quot;state&quot;: &quot;A String&quot;, # State of the answer generation.
          },
          &quot;query&quot;: { # Defines a user inputed query. # Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn
            &quot;queryId&quot;: &quot;A String&quot;, # Output only. Unique Id for the query.
            &quot;text&quot;: &quot;A String&quot;, # Plain text.
          },
          &quot;queryConfig&quot;: { # Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix &quot;google.&quot; is reserved for Google-developed functionality.
            &quot;a_key&quot;: &quot;A String&quot;,
          },
        },
      ],
      &quot;userPseudoId&quot;: &quot;A String&quot;, # A unique identifier for tracking users.
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
  <pre>Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.

Args:
  name: string, Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*` (required)
  body: object, The request body.
    The object takes the form of:

{ # External session proto definition.
  &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
  &quot;endTime&quot;: &quot;A String&quot;, # Output only. The time the session finished.
  &quot;isPinned&quot;: True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
  &quot;labels&quot;: [ # Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
    &quot;A String&quot;,
  ],
  &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
  &quot;startTime&quot;: &quot;A String&quot;, # Output only. The time the session started.
  &quot;state&quot;: &quot;A String&quot;, # The state of the session.
  &quot;turns&quot;: [ # Turns.
    { # Represents a turn, including a query from the user and a answer from service.
      &quot;answer&quot;: &quot;A String&quot;, # Optional. The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
      &quot;detailedAnswer&quot;: { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
        &quot;answerSkippedReasons&quot;: [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
          &quot;A String&quot;,
        ],
        &quot;answerText&quot;: &quot;A String&quot;, # The textual answer.
        &quot;citations&quot;: [ # Citations.
          { # Citation info for a segment.
            &quot;endIndex&quot;: &quot;A String&quot;, # End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
            &quot;sources&quot;: [ # Citation sources for the attributed segment.
              { # Citation source.
                &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
              },
            ],
            &quot;startIndex&quot;: &quot;A String&quot;, # Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
          },
        ],
        &quot;completeTime&quot;: &quot;A String&quot;, # Output only. Answer completed timestamp.
        &quot;createTime&quot;: &quot;A String&quot;, # Output only. Answer creation timestamp.
        &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
        &quot;groundingSupports&quot;: [ # Optional. Grounding supports.
          { # Grounding support for a claim in `answer_text`.
            &quot;endIndex&quot;: &quot;A String&quot;, # Required. End of the claim, exclusive.
            &quot;groundingCheckRequired&quot;: True or False, # Indicates that this claim required grounding check. When the system decided this claim didn&#x27;t require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
            &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
            &quot;sources&quot;: [ # Optional. Citation sources for the claim.
              { # Citation source.
                &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
              },
            ],
            &quot;startIndex&quot;: &quot;A String&quot;, # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
          },
        ],
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
        &quot;queryUnderstandingInfo&quot;: { # Query understanding information. # Query understanding information.
          &quot;queryClassificationInfo&quot;: [ # Query classification information.
            { # Query classification information.
              &quot;positive&quot;: True or False, # Classification output.
              &quot;type&quot;: &quot;A String&quot;, # Query classification type.
            },
          ],
        },
        &quot;references&quot;: [ # References.
          { # Reference.
            &quot;chunkInfo&quot;: { # Chunk information. # Chunk information.
              &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
              &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
              &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;title&quot;: &quot;A String&quot;, # Title.
                &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
              },
              &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
            },
            &quot;structuredDocumentInfo&quot;: { # Structured search information. # Structured document information.
              &quot;document&quot;: &quot;A String&quot;, # Document resource name.
              &quot;structData&quot;: { # Structured search data.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;title&quot;: &quot;A String&quot;, # Output only. The title of the document.
              &quot;uri&quot;: &quot;A String&quot;, # Output only. The URI of the document.
            },
            &quot;unstructuredDocumentInfo&quot;: { # Unstructured document information. # Unstructured document information.
              &quot;chunkContents&quot;: [ # List of cited chunk contents derived from document content.
                { # Chunk content.
                  &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                  &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                  &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                },
              ],
              &quot;document&quot;: &quot;A String&quot;, # Document resource name.
              &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;title&quot;: &quot;A String&quot;, # Title.
              &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
            },
          },
        ],
        &quot;relatedQuestions&quot;: [ # Suggested related questions.
          &quot;A String&quot;,
        ],
        &quot;safetyRatings&quot;: [ # Optional. Safety ratings.
          { # Safety rating corresponding to the generated content.
            &quot;blocked&quot;: True or False, # Output only. Indicates whether the content was filtered out because of this rating.
            &quot;category&quot;: &quot;A String&quot;, # Output only. Harm category.
            &quot;probability&quot;: &quot;A String&quot;, # Output only. Harm probability levels in the content.
            &quot;probabilityScore&quot;: 3.14, # Output only. Harm probability score.
            &quot;severity&quot;: &quot;A String&quot;, # Output only. Harm severity levels in the content.
            &quot;severityScore&quot;: 3.14, # Output only. Harm severity score.
          },
        ],
        &quot;state&quot;: &quot;A String&quot;, # The state of the answer generation.
        &quot;steps&quot;: [ # Answer generation steps.
          { # Step information.
            &quot;actions&quot;: [ # Actions.
              { # Action.
                &quot;observation&quot;: { # Observation. # Observation.
                  &quot;searchResults&quot;: [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
                    {
                      &quot;chunkInfo&quot;: [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
                        { # Chunk information.
                          &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
                          &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                          &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                        },
                      ],
                      &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                      &quot;snippetInfo&quot;: [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
                        { # Snippet information.
                          &quot;snippet&quot;: &quot;A String&quot;, # Snippet content.
                          &quot;snippetStatus&quot;: &quot;A String&quot;, # Status of the snippet defined by the search team.
                        },
                      ],
                      &quot;structData&quot;: { # Data representation. The structured JSON data for the document. It&#x27;s populated from the struct data from the Document, or the Chunk in search result.
                        &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                      },
                      &quot;title&quot;: &quot;A String&quot;, # Title.
                      &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
                    },
                  ],
                },
                &quot;searchAction&quot;: { # Search action. # Search action.
                  &quot;query&quot;: &quot;A String&quot;, # The query to search.
                },
              },
            ],
            &quot;description&quot;: &quot;A String&quot;, # The description of the step.
            &quot;state&quot;: &quot;A String&quot;, # The state of the step.
            &quot;thought&quot;: &quot;A String&quot;, # The thought of the step.
          },
        ],
      },
      &quot;detailedAssistAnswer&quot;: { # AssistAnswer resource, main part of AssistResponse. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting assistant session.
        &quot;assistSkippedReasons&quot;: [ # Reasons for not answering the assist call.
          &quot;A String&quot;,
        ],
        &quot;customerPolicyEnforcementResult&quot;: { # Customer policy enforcement results. Contains the results of the various policy checks, like the banned phrases or the Model Armor checks. # Optional. The field contains information about the various policy checks&#x27; results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.
          &quot;policyResults&quot;: [ # Customer policy enforcement results. Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.
            { # Customer policy enforcement result for a single policy type.
              &quot;bannedPhraseEnforcementResult&quot;: { # Customer policy enforcement result for the banned phrase policy. # The policy enforcement result for the banned phrase policy.
                &quot;bannedPhrases&quot;: [ # The banned phrases that were found in the query or the answer.
                  &quot;A String&quot;,
                ],
              },
              &quot;modelArmorEnforcementResult&quot;: { # Customer policy enforcement result for the Model Armor policy. # The policy enforcement result for the Model Armor policy.
                &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error returned by Model Armor if the policy enforcement failed for some reason.
                  &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
                  &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                    {
                      &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
                    },
                  ],
                  &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
                },
                &quot;modelArmorViolation&quot;: &quot;A String&quot;, # The Model Armor violation that was found.
              },
            },
          ],
          &quot;verdict&quot;: &quot;A String&quot;, # Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.
        },
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Identifier. Resource name of the `AssistAnswer`. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` This field must be a UTF-8 encoded string with a length limit of 1024 characters.
        &quot;replies&quot;: [ # Replies of the assistant.
          { # One part of the multi-part response of the assist call.
            &quot;groundedContent&quot;: { # A piece of content and possibly its grounding information. Not all content needs grounding. Phrases like &quot;Of course, I will gladly search it for you.&quot; do not need grounding. # Possibly grounded response text or media from the assistant.
              &quot;citationMetadata&quot;: { # A collection of source attributions for a piece of content. # Source attribution of the generated content. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
                &quot;citations&quot;: [ # Output only. List of citations.
                  { # Source attributions for content.
                    &quot;endIndex&quot;: 42, # Output only. End index into the content.
                    &quot;license&quot;: &quot;A String&quot;, # Output only. License of the attribution.
                    &quot;publicationDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Publication date of the attribution.
                      &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
                      &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
                      &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
                    },
                    &quot;startIndex&quot;: 42, # Output only. Start index into the content.
                    &quot;title&quot;: &quot;A String&quot;, # Output only. Title of the attribution.
                    &quot;uri&quot;: &quot;A String&quot;, # Output only. Url reference of the attribution.
                  },
                ],
              },
              &quot;content&quot;: { # Multi-modal content. # The content.
                &quot;codeExecutionResult&quot;: { # Result of executing ExecutableCode. # Result of executing an ExecutableCode.
                  &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
                  &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
                },
                &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed by the model. # Code generated by the model that is meant to be executed.
                  &quot;code&quot;: &quot;A String&quot;, # Required. The code content. Currently only supports Python.
                },
                &quot;file&quot;: { # A file, e.g., an audio summary. # A file, e.g., an audio summary.
                  &quot;fileId&quot;: &quot;A String&quot;, # Required. The file ID.
                  &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the file.
                },
                &quot;inlineData&quot;: { # Inline blob. # Inline binary data.
                  &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
                  &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the generated data.
                },
                &quot;role&quot;: &quot;A String&quot;, # The producer of the content. Can be &quot;model&quot; or &quot;user&quot;.
                &quot;text&quot;: &quot;A String&quot;, # Inline text.
                &quot;thought&quot;: True or False, # Optional. Indicates if the part is thought from the model.
              },
              &quot;textGroundingMetadata&quot;: { # Grounding details for text sources. # Metadata for grounding based on text sources.
                &quot;references&quot;: [ # References for the grounded text.
                  { # Referenced content and related document metadata.
                    &quot;content&quot;: &quot;A String&quot;, # Referenced text content.
                    &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                      &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                      &quot;domain&quot;: &quot;A String&quot;, # Domain name from the document URI. Note that the `uri` field may contain a URL that redirects to the actual website, in which case this will contain the domain name of the target site.
                      &quot;mimeType&quot;: &quot;A String&quot;, # The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml.
                      &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                      &quot;title&quot;: &quot;A String&quot;, # Title.
                      &quot;uri&quot;: &quot;A String&quot;, # URI for the document. It may contain a URL that redirects to the actual website.
                    },
                  },
                ],
                &quot;segments&quot;: [ # Grounding information for parts of the text.
                  { # Grounding information for a segment of the text.
                    &quot;endIndex&quot;: &quot;A String&quot;, # End of the segment, exclusive.
                    &quot;groundingScore&quot;: 3.14, # Score for the segment.
                    &quot;referenceIndices&quot;: [ # References for the segment.
                      42,
                    ],
                    &quot;startIndex&quot;: &quot;A String&quot;, # Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
                    &quot;text&quot;: &quot;A String&quot;, # The text segment itself.
                  },
                ],
              },
            },
          },
        ],
        &quot;state&quot;: &quot;A String&quot;, # State of the answer generation.
      },
      &quot;query&quot;: { # Defines a user inputed query. # Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn
        &quot;queryId&quot;: &quot;A String&quot;, # Output only. Unique Id for the query.
        &quot;text&quot;: &quot;A String&quot;, # Plain text.
      },
      &quot;queryConfig&quot;: { # Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix &quot;google.&quot; is reserved for Google-developed functionality.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
    },
  ],
  &quot;userPseudoId&quot;: &quot;A String&quot;, # A unique identifier for tracking users.
}

  updateMask: string, Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # External session proto definition.
  &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.
  &quot;endTime&quot;: &quot;A String&quot;, # Output only. The time the session finished.
  &quot;isPinned&quot;: True or False, # Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.
  &quot;labels&quot;: [ # Optional. The labels for the session. Can be set as filter in ListSessionsRequest.
    &quot;A String&quot;,
  ],
  &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
  &quot;startTime&quot;: &quot;A String&quot;, # Output only. The time the session started.
  &quot;state&quot;: &quot;A String&quot;, # The state of the session.
  &quot;turns&quot;: [ # Turns.
    { # Represents a turn, including a query from the user and a answer from service.
      &quot;answer&quot;: &quot;A String&quot;, # Optional. The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.
      &quot;detailedAnswer&quot;: { # Defines an answer. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting answer query session.
        &quot;answerSkippedReasons&quot;: [ # Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.
          &quot;A String&quot;,
        ],
        &quot;answerText&quot;: &quot;A String&quot;, # The textual answer.
        &quot;citations&quot;: [ # Citations.
          { # Citation info for a segment.
            &quot;endIndex&quot;: &quot;A String&quot;, # End of the attributed segment, exclusive. Measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
            &quot;sources&quot;: [ # Citation sources for the attributed segment.
              { # Citation source.
                &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
              },
            ],
            &quot;startIndex&quot;: &quot;A String&quot;, # Index indicates the start of the segment, measured in bytes (UTF-8 unicode). If there are multi-byte characters,such as non-ASCII characters, the index measurement is longer than the string length.
          },
        ],
        &quot;completeTime&quot;: &quot;A String&quot;, # Output only. Answer completed timestamp.
        &quot;createTime&quot;: &quot;A String&quot;, # Output only. Answer creation timestamp.
        &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.
        &quot;groundingSupports&quot;: [ # Optional. Grounding supports.
          { # Grounding support for a claim in `answer_text`.
            &quot;endIndex&quot;: &quot;A String&quot;, # Required. End of the claim, exclusive.
            &quot;groundingCheckRequired&quot;: True or False, # Indicates that this claim required grounding check. When the system decided this claim didn&#x27;t require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.
            &quot;groundingScore&quot;: 3.14, # A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.
            &quot;sources&quot;: [ # Optional. Citation sources for the claim.
              { # Citation source.
                &quot;referenceId&quot;: &quot;A String&quot;, # ID of the citation source.
              },
            ],
            &quot;startIndex&quot;: &quot;A String&quot;, # Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).
          },
        ],
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
        &quot;queryUnderstandingInfo&quot;: { # Query understanding information. # Query understanding information.
          &quot;queryClassificationInfo&quot;: [ # Query classification information.
            { # Query classification information.
              &quot;positive&quot;: True or False, # Classification output.
              &quot;type&quot;: &quot;A String&quot;, # Query classification type.
            },
          ],
        },
        &quot;references&quot;: [ # References.
          { # Reference.
            &quot;chunkInfo&quot;: { # Chunk information. # Chunk information.
              &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
              &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
              &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                  &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                },
                &quot;title&quot;: &quot;A String&quot;, # Title.
                &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
              },
              &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
            },
            &quot;structuredDocumentInfo&quot;: { # Structured search information. # Structured document information.
              &quot;document&quot;: &quot;A String&quot;, # Document resource name.
              &quot;structData&quot;: { # Structured search data.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;title&quot;: &quot;A String&quot;, # Output only. The title of the document.
              &quot;uri&quot;: &quot;A String&quot;, # Output only. The URI of the document.
            },
            &quot;unstructuredDocumentInfo&quot;: { # Unstructured document information. # Unstructured document information.
              &quot;chunkContents&quot;: [ # List of cited chunk contents derived from document content.
                { # Chunk content.
                  &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                  &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                  &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                },
              ],
              &quot;document&quot;: &quot;A String&quot;, # Document resource name.
              &quot;structData&quot;: { # The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.
                &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
              },
              &quot;title&quot;: &quot;A String&quot;, # Title.
              &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
            },
          },
        ],
        &quot;relatedQuestions&quot;: [ # Suggested related questions.
          &quot;A String&quot;,
        ],
        &quot;safetyRatings&quot;: [ # Optional. Safety ratings.
          { # Safety rating corresponding to the generated content.
            &quot;blocked&quot;: True or False, # Output only. Indicates whether the content was filtered out because of this rating.
            &quot;category&quot;: &quot;A String&quot;, # Output only. Harm category.
            &quot;probability&quot;: &quot;A String&quot;, # Output only. Harm probability levels in the content.
            &quot;probabilityScore&quot;: 3.14, # Output only. Harm probability score.
            &quot;severity&quot;: &quot;A String&quot;, # Output only. Harm severity levels in the content.
            &quot;severityScore&quot;: 3.14, # Output only. Harm severity score.
          },
        ],
        &quot;state&quot;: &quot;A String&quot;, # The state of the answer generation.
        &quot;steps&quot;: [ # Answer generation steps.
          { # Step information.
            &quot;actions&quot;: [ # Actions.
              { # Action.
                &quot;observation&quot;: { # Observation. # Observation.
                  &quot;searchResults&quot;: [ # Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.
                    {
                      &quot;chunkInfo&quot;: [ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.
                        { # Chunk information.
                          &quot;chunk&quot;: &quot;A String&quot;, # Chunk resource name.
                          &quot;content&quot;: &quot;A String&quot;, # Chunk textual content.
                          &quot;relevanceScore&quot;: 3.14, # The relevance of the chunk for a given query. Values range from 0.0 (completely irrelevant) to 1.0 (completely relevant). This value is for informational purpose only. It may change for the same query and chunk at any time due to a model retraining or change in implementation.
                        },
                      ],
                      &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                      &quot;snippetInfo&quot;: [ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.
                        { # Snippet information.
                          &quot;snippet&quot;: &quot;A String&quot;, # Snippet content.
                          &quot;snippetStatus&quot;: &quot;A String&quot;, # Status of the snippet defined by the search team.
                        },
                      ],
                      &quot;structData&quot;: { # Data representation. The structured JSON data for the document. It&#x27;s populated from the struct data from the Document, or the Chunk in search result.
                        &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
                      },
                      &quot;title&quot;: &quot;A String&quot;, # Title.
                      &quot;uri&quot;: &quot;A String&quot;, # URI for the document.
                    },
                  ],
                },
                &quot;searchAction&quot;: { # Search action. # Search action.
                  &quot;query&quot;: &quot;A String&quot;, # The query to search.
                },
              },
            ],
            &quot;description&quot;: &quot;A String&quot;, # The description of the step.
            &quot;state&quot;: &quot;A String&quot;, # The state of the step.
            &quot;thought&quot;: &quot;A String&quot;, # The thought of the step.
          },
        ],
      },
      &quot;detailedAssistAnswer&quot;: { # AssistAnswer resource, main part of AssistResponse. # Output only. In ConversationalSearchService.GetSession API, if GetSessionRequest.include_answer_details is set to true, this field will be populated when getting assistant session.
        &quot;assistSkippedReasons&quot;: [ # Reasons for not answering the assist call.
          &quot;A String&quot;,
        ],
        &quot;customerPolicyEnforcementResult&quot;: { # Customer policy enforcement results. Contains the results of the various policy checks, like the banned phrases or the Model Armor checks. # Optional. The field contains information about the various policy checks&#x27; results like the banned phrases or the Model Armor checks. This field is populated only if the assist call was skipped due to a policy violation.
          &quot;policyResults&quot;: [ # Customer policy enforcement results. Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.
            { # Customer policy enforcement result for a single policy type.
              &quot;bannedPhraseEnforcementResult&quot;: { # Customer policy enforcement result for the banned phrase policy. # The policy enforcement result for the banned phrase policy.
                &quot;bannedPhrases&quot;: [ # The banned phrases that were found in the query or the answer.
                  &quot;A String&quot;,
                ],
              },
              &quot;modelArmorEnforcementResult&quot;: { # Customer policy enforcement result for the Model Armor policy. # The policy enforcement result for the Model Armor policy.
                &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error returned by Model Armor if the policy enforcement failed for some reason.
                  &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
                  &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                    {
                      &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
                    },
                  ],
                  &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
                },
                &quot;modelArmorViolation&quot;: &quot;A String&quot;, # The Model Armor violation that was found.
              },
            },
          ],
          &quot;verdict&quot;: &quot;A String&quot;, # Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.
        },
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Identifier. Resource name of the `AssistAnswer`. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` This field must be a UTF-8 encoded string with a length limit of 1024 characters.
        &quot;replies&quot;: [ # Replies of the assistant.
          { # One part of the multi-part response of the assist call.
            &quot;groundedContent&quot;: { # A piece of content and possibly its grounding information. Not all content needs grounding. Phrases like &quot;Of course, I will gladly search it for you.&quot; do not need grounding. # Possibly grounded response text or media from the assistant.
              &quot;citationMetadata&quot;: { # A collection of source attributions for a piece of content. # Source attribution of the generated content. See also https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
                &quot;citations&quot;: [ # Output only. List of citations.
                  { # Source attributions for content.
                    &quot;endIndex&quot;: 42, # Output only. End index into the content.
                    &quot;license&quot;: &quot;A String&quot;, # Output only. License of the attribution.
                    &quot;publicationDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Output only. Publication date of the attribution.
                      &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
                      &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
                      &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
                    },
                    &quot;startIndex&quot;: 42, # Output only. Start index into the content.
                    &quot;title&quot;: &quot;A String&quot;, # Output only. Title of the attribution.
                    &quot;uri&quot;: &quot;A String&quot;, # Output only. Url reference of the attribution.
                  },
                ],
              },
              &quot;content&quot;: { # Multi-modal content. # The content.
                &quot;codeExecutionResult&quot;: { # Result of executing ExecutableCode. # Result of executing an ExecutableCode.
                  &quot;outcome&quot;: &quot;A String&quot;, # Required. Outcome of the code execution.
                  &quot;output&quot;: &quot;A String&quot;, # Optional. Contains stdout when code execution is successful, stderr or other description otherwise.
                },
                &quot;executableCode&quot;: { # Code generated by the model that is meant to be executed by the model. # Code generated by the model that is meant to be executed.
                  &quot;code&quot;: &quot;A String&quot;, # Required. The code content. Currently only supports Python.
                },
                &quot;file&quot;: { # A file, e.g., an audio summary. # A file, e.g., an audio summary.
                  &quot;fileId&quot;: &quot;A String&quot;, # Required. The file ID.
                  &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the file.
                },
                &quot;inlineData&quot;: { # Inline blob. # Inline binary data.
                  &quot;data&quot;: &quot;A String&quot;, # Required. Raw bytes.
                  &quot;mimeType&quot;: &quot;A String&quot;, # Required. The media type (MIME type) of the generated data.
                },
                &quot;role&quot;: &quot;A String&quot;, # The producer of the content. Can be &quot;model&quot; or &quot;user&quot;.
                &quot;text&quot;: &quot;A String&quot;, # Inline text.
                &quot;thought&quot;: True or False, # Optional. Indicates if the part is thought from the model.
              },
              &quot;textGroundingMetadata&quot;: { # Grounding details for text sources. # Metadata for grounding based on text sources.
                &quot;references&quot;: [ # References for the grounded text.
                  { # Referenced content and related document metadata.
                    &quot;content&quot;: &quot;A String&quot;, # Referenced text content.
                    &quot;documentMetadata&quot;: { # Document metadata. # Document metadata.
                      &quot;document&quot;: &quot;A String&quot;, # Document resource name.
                      &quot;domain&quot;: &quot;A String&quot;, # Domain name from the document URI. Note that the `uri` field may contain a URL that redirects to the actual website, in which case this will contain the domain name of the target site.
                      &quot;mimeType&quot;: &quot;A String&quot;, # The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml.
                      &quot;pageIdentifier&quot;: &quot;A String&quot;, # Page identifier.
                      &quot;title&quot;: &quot;A String&quot;, # Title.
                      &quot;uri&quot;: &quot;A String&quot;, # URI for the document. It may contain a URL that redirects to the actual website.
                    },
                  },
                ],
                &quot;segments&quot;: [ # Grounding information for parts of the text.
                  { # Grounding information for a segment of the text.
                    &quot;endIndex&quot;: &quot;A String&quot;, # End of the segment, exclusive.
                    &quot;groundingScore&quot;: 3.14, # Score for the segment.
                    &quot;referenceIndices&quot;: [ # References for the segment.
                      42,
                    ],
                    &quot;startIndex&quot;: &quot;A String&quot;, # Zero-based index indicating the start of the segment, measured in bytes of a UTF-8 string (i.e. characters encoded on multiple bytes have a length of more than one).
                    &quot;text&quot;: &quot;A String&quot;, # The text segment itself.
                  },
                ],
              },
            },
          },
        ],
        &quot;state&quot;: &quot;A String&quot;, # State of the answer generation.
      },
      &quot;query&quot;: { # Defines a user inputed query. # Optional. The user query. May not be set if this turn is merely regenerating an answer to a different turn
        &quot;queryId&quot;: &quot;A String&quot;, # Output only. Unique Id for the query.
        &quot;text&quot;: &quot;A String&quot;, # Plain text.
      },
      &quot;queryConfig&quot;: { # Optional. Represents metadata related to the query config, for example LLM model and version used, model parameters (temperature, grounding parameters, etc.). The prefix &quot;google.&quot; is reserved for Google-developed functionality.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
    },
  ],
  &quot;userPseudoId&quot;: &quot;A String&quot;, # A unique identifier for tracking users.
}</pre>
</div>

</body></html>